home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19981211-19990422 / 000146_news@watsun.cc.columbia.edu _Sun Jan 24 17:47:13 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id RAA15050
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Sun, 24 Jan 1999 17:47:13 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id RAA17660
  7.     for kermit.misc@watsun.cc.columbia.edu; Sun, 24 Jan 1999 17:33:13 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: sleeping for random amounts of time
  11. Date: 24 Jan 1999 22:33:11 GMT
  12. Organization: Columbia University
  13. Message-ID: <78g737$h7q$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@mailrelay2.cc.columbia.edu
  15.  
  16. In article <gerlachF60yL4.A3t@netcom.com>,
  17. Matthew H. Gerlach <gerlach@netcom.com> wrote:
  18. : Thank you for the usual prompt and useful answer.  The great support
  19. : is one of many reasons I use kermit and tell anyone who'll listen to use
  20. : kermit.
  21. Thanks!
  22.  
  23. : Most of the time I use Ckermit on a variety of Unix, but when I need to 
  24. : do something for a PC Kermit95 does the trick.    
  25. : It sounds to me that I'll get the CKermit 7.0 and give it a go.  Will
  26. : this function be mentioned in the source code's documentation?
  27. Of course.  The function is \frandom(n); it returns a pseudorandom integer
  28. between 0 and n-1.
  29.  
  30. If you want to do random sleeps with smaller granularity than a second, you
  31. can use something like:
  32.  
  33.   msleep(\frandom(3000))
  34.  
  35. (sleep a random amount of time between 0 and 2999 milliseconds.)
  36.  
  37. - Frank